package com.tb.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

public class Order implements Serializable {

    private Integer id;

    private Integer orderItemId;

    private String sendAddressProvince;

    private String sendAddressCity;

    private String sendAddressArea;

    private String sendAddressStreet;

    private String recivePhone;

    private String orderName;

    private String userName;

    private Integer orderStatus;

    private Float orderTotalPrice;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date orderTime;

    private User user;//宁-新增

    private Goods goods;

    public Goods getGoods() {
        return goods;
    }

    public void setGoods(Goods goods) {
        this.goods = goods;
    }

    private List<OrderItem> orderItem;//宁-新增

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getOrderItemId() {
        return orderItemId;
    }

    public void setOrderItemId(Integer orderItemId) {
        this.orderItemId = orderItemId;
    }

    public String getSendAddressProvince() {
        return sendAddressProvince;
    }

    public void setSendAddressProvince(String sendAddressProvince) {
        this.sendAddressProvince = sendAddressProvince == null ? null : sendAddressProvince.trim();
    }

    public String getSendAddressCity() {
        return sendAddressCity;
    }

    public void setSendAddressCity(String sendAddressCity) {
        this.sendAddressCity = sendAddressCity == null ? null : sendAddressCity.trim();
    }

    public String getSendAddressArea() {
        return sendAddressArea;
    }

    public void setSendAddressArea(String sendAddressArea) {
        this.sendAddressArea = sendAddressArea == null ? null : sendAddressArea.trim();
    }

    public String getSendAddressStreet() {
        return sendAddressStreet;
    }

    public void setSendAddressStreet(String sendAddressStreet) {
        this.sendAddressStreet = sendAddressStreet == null ? null : sendAddressStreet.trim();
    }

    public String getRecivePhone() {
        return recivePhone;
    }

    public void setRecivePhone(String recivePhone) {
        this.recivePhone = recivePhone == null ? null : recivePhone.trim();
    }

    public String getOrderName() {
        return orderName;
    }

    public void setOrderName(String orderName) {
        this.orderName = orderName == null ? null : orderName.trim();
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName == null ? null : userName.trim();
    }

    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    public Float getOrderTotalPrice() {
        return orderTotalPrice;
    }

    public void setOrderTotalPrice(Float orderTotalPrice) {
        this.orderTotalPrice = orderTotalPrice;
    }

    public Date getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(Date orderTime) {
        this.orderTime = orderTime;
    }

    //联查User GET方法-宁
    public User getUser() {
        return user;
    }
    //联查User SET方法-宁
    public void setUser(User user) {
        this.user = user;
    }
    //联查OrderItem GET方法-宁
    public List<OrderItem> getOrderItem() {
        return orderItem;
    }
    //联查OrderItem SET方法-宁
    public void setOrderItem(List<OrderItem> orderItem) {
        this.orderItem = orderItem;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", orderItemId=" + orderItemId +
                ", sendAddressProvince='" + sendAddressProvince + '\'' +
                ", sendAddressCity='" + sendAddressCity + '\'' +
                ", sendAddressArea='" + sendAddressArea + '\'' +
                ", sendAddressStreet='" + sendAddressStreet + '\'' +
                ", recivePhone='" + recivePhone + '\'' +
                ", orderName='" + orderName + '\'' +
                ", userName='" + userName + '\'' +
                ", orderStatus=" + orderStatus +
                ", orderTotalPrice=" + orderTotalPrice +
                ", orderTime=" + orderTime +
                ", user=" + user +
                ", orderItem=" + orderItem +
                '}';
    }
}